package com.qfedu.dao;

import com.qfedu.pojo.entity.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface RoleRepository extends JpaRepository<Role, Integer> {
    @Query(value = "select roleid from user_role where userid = ?1", nativeQuery = true)
    List<Integer> selectRoleIdByUserId(int id);
}
